package com.ruoyi.project.mahjong.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mahjong.mapper.TConsumptionOrderMapper;
import com.ruoyi.project.mahjong.domain.TConsumptionOrder;
import com.ruoyi.project.mahjong.service.ITConsumptionOrderService;

/**
 * 消费清单Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-18
 */
@Service
public class TConsumptionOrderServiceImpl implements ITConsumptionOrderService 
{
    @Autowired
    private TConsumptionOrderMapper tConsumptionOrderMapper;

    /**
     * 查询消费清单
     * 
     * @param id 消费清单ID
     * @return 消费清单
     */
    @Override
    public TConsumptionOrder selectTConsumptionOrderById(Long id)
    {
        return tConsumptionOrderMapper.selectTConsumptionOrderById(id);
    }

    /**
     * 查询消费清单列表
     * 
     * @param tConsumptionOrder 消费清单
     * @return 消费清单
     */
    @Override
    public List<TConsumptionOrder> selectTConsumptionOrderList(TConsumptionOrder tConsumptionOrder)
    {
        return tConsumptionOrderMapper.selectTConsumptionOrderList(tConsumptionOrder);
    }

    /**
     * 新增消费清单
     * 
     * @param tConsumptionOrder 消费清单
     * @return 结果
     */
    @Override
    public int insertTConsumptionOrder(TConsumptionOrder tConsumptionOrder)
    {
        tConsumptionOrder.setCreateTime(DateUtils.getNowDate());
        return tConsumptionOrderMapper.insertTConsumptionOrder(tConsumptionOrder);
    }

    /**
     * 修改消费清单
     * 
     * @param tConsumptionOrder 消费清单
     * @return 结果
     */
    @Override
    public int updateTConsumptionOrder(TConsumptionOrder tConsumptionOrder)
    {
        tConsumptionOrder.setUpdateTime(DateUtils.getNowDate());
        return tConsumptionOrderMapper.updateTConsumptionOrder(tConsumptionOrder);
    }

    /**
     * 批量删除消费清单
     * 
     * @param ids 需要删除的消费清单ID
     * @return 结果
     */
    @Override
    public int deleteTConsumptionOrderByIds(Long[] ids)
    {
        return tConsumptionOrderMapper.deleteTConsumptionOrderByIds(ids);
    }

    /**
     * 删除消费清单信息
     * 
     * @param id 消费清单ID
     * @return 结果
     */
    @Override
    public int deleteTConsumptionOrderById(Long id)
    {
        return tConsumptionOrderMapper.deleteTConsumptionOrderById(id);
    }
}
